package org.huangxiaozhe.Test;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.media.Ringtone;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Bundle;
import android.provider.Settings;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AbsoluteLayout;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.TextView;

public class MainActivity extends Activity implements OnClickListener {

	@Override
	protected void onPause() {
		// TODO Auto-generated method stub
		super.onPause();
	}

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.first);
		findViewById(R.id.button_bar).setOnClickListener(this);
		findViewById(R.id.button_line).setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.button_line:
			startActivity(new Intent(this,ChartActivity.class)
			.putExtra("type", true));
			break;
		case R.id.button_bar:
			startActivity(new Intent(this,ChartActivity.class)
			.putExtra("type", false));
			break;
		}
	}

	@Override
	protected void onDestroy() {

		super.onDestroy();
	}

}